

<template>
	<view class="home_content" v-if='pageData' :style="{'--color': color}">
		<status-bar ref='statusbar' :title='pageData.title?pageData.title:"首页"' back='0' :hideBg='hideBg' isHome='1'></status-bar>	
		
		<backTop v-if='toTop && (!showLessonDoor || !lesson_config)'></backTop>
		<!-- 课程入口 -->

		
	
		
		<!-- 分享 -->
		<!-- <view class="shareBox" v-show='!showShareQr' @click="showShareQr=true">
			<image :src="staticUrl+'/images/cat.gif'" mode=""></image>
		</view>
		 -->
		
		
		
		<!-- 多图轮播开始 目前图片尺寸是 375*165-->
		<template v-if='pageData.bannerData && pageData.bannerData.state == 1'>
			<view class="uni-padding-wrap thmeBg " :class="{
				new_style: pageData.bannerData.chameleon == 1
			}" style="margin-top: -1px;" v-if='pageData.bannerData.list' :style="{'--color': color}">
				<view class="liner_bg" v-if='pageData.bannerData.chameleon == 1' :style="{
					height: 'calc(100% + '+ navHeight +'px)',
					background: 'linear-gradient(to bottom, '+currBg+',#FFFFFF)'
				}"></view>
				<view class="oval-cover">
					<view class="oval thmeBg" :style="{'--color': color}"></view>
				</view>
				<view class="page-section">
					<view class="page-section-spacing">
						<swiper circular='true' class="swiper" :indicator-dots="false" @change="swiperChange" autoplay="true" loop='true'
						 interval="5000" duration="800">
							<swiper-item v-for='(ban,index_ban) in pageData.bannerData.list' :key='index_ban' 
							@click="banerGo(ban,ban.banner_name,1)">
								<image class="swiperImg" :src="imgUrl+ban.img" mode="aspectFill"></image>
							</swiper-item>
						</swiper>
						<view class='swiper-duration'>
							<view v-for='(dot,index_dot) in pageData.bannerData.list' :class='swiperIndex == index_dot?"swiper-active thmeBg":"swiper-index"'
							 :key='index_dot' :style="{'--color': color}"></view>
						</view>
					</view>
				</view>
			</view>
		</template>

		<!-- 分类/魔方导航/金刚区 -->
		<view class="classify" v-if='sortListData'>
			<view class="sortList">
				<block  v-for='(sort,index_sort) in sortListData' :key='index_sort' >
					<view class="sort-item" @click="banerGo(sort,sort.classify_name,0)" v-if="sort.classify_id != '36358' &&  sort.classify_id != '36360'">
						<image @error="sort.classify_img=''" 
						:src="sort.classify_img?imgUrl+sort.classify_img:staticUrl+'/images/imageLoading.png'" mode="widthFix"></image>
						<text>{{sort.classify_name?sort.classify_name:'分类名称'}}</text>
					</view>
					<!-- 分享 -->
					<view class="sort-item"  v-if="sort.classify_id == '36360'" @click="showShareQr=true">
						<image @error="sort.classify_img=''" 
						:src="sort.classify_img?imgUrl+sort.classify_img:staticUrl+'/images/imageLoading.png'" mode="widthFix"></image>
						<text>{{sort.classify_name?sort.classify_name:'分类名称'}}</text>
					</view>
					<!-- 咨询 -->
					 <view class="sort-item" v-if="sort.classify_id == '36358'">
					  <button open-type="contact" class="navButton"></button>
						<image @error="sort.classify_img=''" 
						:src="sort.classify_img?imgUrl+sort.classify_img:staticUrl+'/images/imageLoading.png'" mode="widthFix"></image>
						<text>{{sort.classify_name?sort.classify_name:'分类名称'}}</text>
					</view>
				</block>
			</view>
			<!-- <view class="sortList">
				<view class="sort-item" @click="banerGo(sort,sort.classify_name,0)"
				 v-for='(sort,index_sort1) in sortListData' :key='index_sort1' v-if="index_sort1 > 4 && index_sort1 < 10 || index_sort1 > 9 && index_sort1%2 == 1">
					<image @error="sort.classify_img=''" 
					:src="sort.classify_img?imgUrl+sort.classify_img:staticUrl+'/images/imageLoading.png'" mode="widthFix"></image>
					<text>{{sort.classify_name?sort.classify_name:'分类名称'}}</text>
				</view>
			</view> -->
		</view>

		<!-- 通告 -->
		<template v-if='pageData.noticeData && pageData.noticeData.state == 1'>
			<view class="notice flex-box align-center" v-if='pageData.noticeData.list'>
				<view class="thmeColor" :style="{'--color': color}">
					<text class="icon-tongzhi iconfont"></text>
					<text class="name" v-if='pageData.noticeData.name'>{{ pageData.noticeData.name }}</text>
				</view>
								
				<swiper class="flex" :autoplay="true" :interval="3000" :duration="1000" circular="true" :vertical="pageData.noticeData.roll==1?true:false">
					<swiper-item class="flex-box align-center" @click="toArticle(item.id)" v-for="(item,i) in pageData.noticeData.list" :key='i'>
						<view class="swiper-item lines">{{ item.name }}</view>
					</swiper-item>
				</swiper>
			</view>
		</template>
		
		<!-- 优惠券 -->
		<template v-if='pageData.couponData && pageData.couponData.state == 1'>
			<view class="coupon" v-if='pageData.couponData.list'>
				<view class="couponTitle flex-box align-center" @click="toOrderList('/userPage/user/discount_coupon')">
					<image class="yhqIcon" :src="staticUrl+'/images/jh_up/icon-yhq.png'" mode=""></image>
					<text class="flex title">优惠券</text>
					<text class="iconfont icon-xiangyouxiayiye"></text>
				</view>
				<view class="coupon-list">
					<view class="coupon-item" v-for='(coupon,index_coupon) in pageData.couponData.list' :key='index_coupon'>
						<!-- :class="{filter:coupon.receivingStatus==1}" -->
						<!-- <image style="width: 60px;height: 60px;margin-top: 10%;z-index: 9999;margin-left: 35%;" v-if="coupon.receivingStatus==1" src="../../static/images/yilingqu.png" mode=""></image> -->
						<view class="couponTag" v-if='coupon.type==1' :style="{background:coupon.backColor}">抵用券</view>
						<view class="couponTag" v-if='coupon.type==2' :style="{background:coupon.backColor}">折扣券</view>
						<view class="couponTag" v-if='coupon.type==3' :style="{background:coupon.backColor}">兑换券</view>
						<view class="couponTag" v-if='coupon.type==4' :style="{background:coupon.backColor}">免邮券</view>
						<view class="couponLeft">
							<view class="couponMoney" v-if='coupon.type==1'><text style="font-size: 26upx;">￥</text>{{coupon.discount}}</view>
							<view class="couponMoney" v-if='coupon.type==2'>{{coupon.discount}}<text style="font-size: 20upx;">折</text></view>
							<view class="couponRequire">{{coupon.title}}</view>
							<view class="couponShop">{{coupon.info}}</view>
						</view>
						<view class="clipLine" :style="'border-left-color:'+coupon.backColor"></view>
						<view class="couponright" :style="'color:'+coupon.backColor" v-if='coupon.receivingStatus == 0' @click="_GETCOUPONS(coupon.cou_id)"><text>领取</text></view>
						<view class="couponright" :class="{touming:coupon.receivingStatus==1}" v-if='coupon.receivingStatus == 1'><text>已领取</text></view>
						<!-- :style="'color:'+coupon.backColor" -->
						<view class="couponBg" :style="'background:'+coupon.backColor"></view>
						<image :src="staticUrl+'/images/jh_up/yhq.png'" mode=""></image>
					</view>
				</view>
			</view>
		</template>
		<dCoupon v-if="isCoupons" :couponArry="getcouponsArry" @closeFunc="isCoupons = false"></dCoupon>

		<!-- 顶部分类 -->
		<scroll-view class="classNav" :style="{top: navHeight+'px'}" :class="navFixed?'navSoptyit':''" scroll-x="true" scroll-with-animation="true"
		 v-if='sortListData'>
			<view class="classNavItem" v-for='(sort1,index_sort2) in sortListData' :key='index_sort2' @click="banerGo(sort1,sort1.classify_name, 0)">{{sort1.classify_name}}</view>
		</scroll-view>

		<!-- 活动展示 -->
		<view class="bottomBox" style="height: 2upx;background-color: #FFFFFF;"></view>
		<template v-if='pageData.actData && pageData.actData.state == 1'>
			<view v-if='pageData.actData.list && pageData.actData.list.length > 0' style="overflow: hidden;">
				<view class="superBrand" v-for='(act,index_act) in pageData.actData.list' :key='index_act' v-if='act.goodsData'>
					<view class="superTitle flex-box align-center" @click="toAct(act.act_id,act.goodsData,act.actType)">
						<image class="superIcon" :src="staticUrl+'/images/jh_up/star.png'" mode="widthFix"></image>
						<text class="brandTitle flex lines">{{act.name}}</text>
						<view class="brandRight flex-box align-center">
							<!-- 一开始 -->
							<template v-if='act.actState == 1'>
								<count-down txtColor='#ff4b4e' fontSize='24' startTxt="距结束" :time="parseInt(act.endTime)"></count-down>
							</template>
							<!-- 未开始 -->
							<template v-if='act.actState == 2'>
								<count-down txtColor='#ff4b4e' fontSize='24' startTxt="距开始" :time="parseInt(act.sTime)"></count-down>
							</template>
							<text class="brandInfo" style="color: #9C9C9C;" v-if='act.actState == 0'>活动已结束</text>
							<text class="iconfont icon-xiangyouxiayiye"></text>
						</view>
					</view>

					<!-- 有两个以及以上商品时 -->
					<view scroll-x="true" class="brandList" v-if='act.goodsData.length>1'>
						<view  v-for="(good,index_good) in act.goodsData" :key='index_good' v-if='index_good<3'>
							<image @click="toGoods(good.goods_id,good.type,good.startState)" class="brandImg" :src="imgUrl+good.img" mode="aspectFill"></image>
							<view class="flex-box">
								<view v-if="good.type==2 || good.type==1" class="speTag">{{good.type==2?'团购':'特价'}}</view>
								<view class="good_name lines">{{good.name}}</view>
							</view>
							<view class="flex-box" v-if="good.type==2">
								<view class="myPrice">{{good.open_group_price}}</view>
								<view class="or" v-if='parseFloat(good.open_group_price) != parseFloat(good.full_price) && good.full_price'>￥{{good.full_price}}</view>
							</view>
							<view v-else class="flex-box">
								<view class="myPrice">{{good.price}}</view>
								<view class="or" v-if='parseFloat(good.price) != parseFloat(good.full_price) && good.full_price'>￥{{good.full_price}}</view>
							</view>
						</view>
					</view>

					<!-- 只有一个商品时 -->
					<view class="gtthree" v-for='(gd,index_gd) in act.goodsData' :key='index_gd' v-if='act.goodsData.length==1' @click="toAct(act.act_id,act.goodsData,act.actType)">
						<view class="gtItem" style="margin-top: 0;">
							<view class="gtImage">
								<image :src="imgUrl+gd.img" mode="aspectFill"></image>
							</view>
							<view class="goods_Msg">
								<view class="flex-box align-center">
									<view class="gtName">
										<text class="myTag" v-if='gd.type == 1'>特价</text>
										<text class="myTag" v-if='gd.type == 2'>团购</text>
										{{gd.name}}
									</view>
									<view class="gtPrice">
										<text class="myPrice" v-if='gd.type == 1 || gd.type == 0'>{{gd.price}}</text>
										<text class="myPrice" v-if='gd.type == 2'>{{gd.open_group_price}}</text>
										<text class="price_regi" v-if='(gd.type == 1 || gd.type == 0) && parseFloat(gd.price)!=parseFloat(gd.full_price) && gd.full_price'>￥{{gd.full_price}}</text>
										<text class="price_regi" v-if='gd.type == 2 && parseFloat(gd.open_group_price)!=parseFloat(gd.full_price) && gd.full_price'>￥{{gd.full_price}}</text>
									</view>
								</view>
								<view class="gtNum-box">
									<view class="gtInfo">{{gd.info}}</view>
									<view class="gtNum" v-if='gd.type == 1'>已抢购{{gd.sales_number}}件</view>
									<view class="gtNum1 thmeBg" v-if='gd.type == 2' :style="{'--color': color}">{{gd.group_number}}人团</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</template>

	


		
	

		<!-- 分类商品 (2) -->
		<view class="v-tabs-box" v-if='tabs && tabs.length > 0'>
			<view class="v-tabs">
				<v-tabs v-if='tabs.length > 0' v-model="current" :tabs="tabs" @change="changeTab" minWidth='18' activeColor='#333333'></v-tabs>
			</view>
			<swiper v-if='tabs && tabs.length > 0' @change="change" :current="current"
				:style="{height:SwipeHeight+'px'}">
				<swiper-item v-for="(item1,index1) in tabs" :key='index1' >
					<view :class="'getHeight'+index1" class="goods-box flex-box">
						<view class="goods" v-if='item1.goods_data && item1.goods_data.length > 0' 
						    v-for="(itm,i) in item1.goods_data" :key='i' 
							@click="istoGoods(item1.type,itm.goods_id,itm.lesson_id)">
							
							<view class="goods-tags" v-if='item1.classify_label && item1.type == 3'>
								<text>{{item1.classify_label}}</text>
							</view>
						
							<image :src="imgUrl+item1.classify_label"  
							      v-if="item1.classify_label && item1.type == 10" 
								  class="imgPost" style="width:200rpx;height: 200rpx;" ></image>
							
							<image @load='getSwiperHeight' :src="itm.lesson_cover?imgUrl+itm.lesson_cover:staticUrl+'/images/imageLoading.png'" mode="aspectFill" v-if="item1.type == 13 || item1.type == 14"></image>
								<image @load='getSwiperHeight' :src="itm.img?imgUrl+itm.img:staticUrl+'/images/imageLoading.png'" mode="aspectFill" v-else></image>
							<view class="msg flex-box flex-between cloumn" 
							     :class="item1.type == 13 || item1.type == 14?'msgHeight1':'msgHeight2'">
								<view>
									<view class="name lines2" v-if="item1.type == 13 || item1.type == 14">
										{{itm.lesson_title}}
									</view>
									<view class="name lines2" v-else>
										<text v-if='itm.type == 1' class="speTag">特价</text>
										<text v-if='itm.type == 2' class="speTag">团购</text>
										{{itm.name}}
									</view>
									 <view class="info ellipsis_2" v-if="item1.type == 13 || item1.type == 14">{{itm.lesson_info}}</view>
									<view class="profitTitle_ lines" v-if='itm.profitTitle'><text>{{itm.profitTitle}}</text></view>

									<view class="info ellipsis_2" v-else-if='itm.price_description'>{{itm.price_description}}</view>
									<view class="info ellipsis_2" v-else>{{itm.info}}</view>
								</view>
								<view class="price flex-box flex-between align-center">
									<template v-if='itm.type == 1 || itm.type == 0'>
										<text class="myPrice">{{itm.price}}</text>
									</template>
									<template v-if='itm.type == 2'>
										<text class="myPrice" v-if="itm.open_group_price">{{itm.open_group_price}}</text>
									</template>
									<!-- <template v-else>
										<text class="myPrice" v-if="itm.lesson_price">{{itm.lesson_price}}</text>
									</template> -->
									<view class="btn thmeBg" v-if="item1.type != 13 && item1.type != 14" :style="{'--color': color}">{{itm.price_name?itm.price_name:'点击速抢'}}</view>
								</view>
							</view>
							
							
						</view>
						<!-- <empty v-else type='1' cat='3' msg='这里空空如也哦 ~'></empty> -->
					</view>
				</swiper-item>
			</swiper>
		</view>
		
		<!-- 推荐门店 -->
		<template v-if='pageData.storeData && pageData.storeData.state == 1'>
			<view class="storeListBox" v-if='pageData.storeData.list'>
				<navigator url="/pages/store/storeList" hover-class="none">
					<view class="flex-box flex-between align-center">
						<text class='iconfont icon-dianpu'></text>
						<text class="flex tjtxt">推荐{{storeName}}</text>
						<text class='iconfont icon-xiangyouxiayiye'></text>
					</view>
				</navigator>
				<view class="storeList">
					<view class="storeItem flex-box align-center" @click="toUrl('/pages/store/storeIndex?shop_id='+item.shop_id)" v-for="(item,index) in pageData.storeData.list" :key='index'>
						<image class="storeLogo" :src="item.logo?imgUrl+item.logo:staticUrl+'/images/imageLoading.png'" mode="aspectFill"></image>
						<view class="flex storemsg">
							<view class="lines storeTitle">{{item.name}}</view>
							<!-- <view class="lines storeType" v-if='bid=="eYiDtKWz6Qhv_bWnBJ7Knw=="' @click.stop="makephone(item.phone)">
								<text class="iconfont icon-dianhua"></text>
								<text class="tel">{{item.phone}} {{item.telExtension}}</text>
							</view> -->
							<view class="lines storeType">经营类别：{{item.bussName}}</view>
							<view class="lines storeType">{{item.address}}</view>
						</view>
					</view>
				</view>
			</view>
		</template>
		
		
		<!-- 分类商品 -->
		<view class="rows m-top20" v-if='pageData.classifyData && pageData.classifyData.state == 1'>
			<block v-for='(item,index) in pageData.classifyData.list' :key="index">
				<view class="indexContens m-top20" >
					<view class="allTitles flex-box align-center">
						<view class="leftS thmeBg" :style="{'--color': color}"></view>
						<text class="flex title lines">{{item.classify_name}}</text>
					</view>
					
					<view class="row j-sb m-top20" >
						<view class="paeninlist bor_radius_10 m-bot20" 
						      v-for='(subItem,subIndex) in item.goods_data' :key='subIndex'
							   @click="istoGoods(item.type,subItem.goods_id,subItem.lesson_id)">
							<image @load='getSwiperHeight'  class="inImgs" :src="subItem.lesson_cover?imgUrl+subItem.lesson_cover:staticUrl+'/images/imageLoading.png'" mode="aspectFill" ></image>
						    <view class="row p-right10 p-left10 m-top20">{{subItem.lesson_title}}</view>
							<view class="rows  ellipsis lesson_isnfo m-top10 ">{{subItem.lesson_info}}</view>
							
						</view>
						
					</view>
					
				</view>
				
			</block>
		</view>
		
		<!-- 官网内容开始 -->
		<template v-if='pageData.websiteData && pageData.websiteData.state == 1'>
			<view class="indexContens" v-for='(list,index_li1) in pageData.websiteData.list' :key='list.website_list_id'>
				<navigator :url="'/pages/article/artList?listId='+list.website_list_id" hover-class="none">
					<view class="allTitles flex-box align-center">
						<view class="leftS thmeBg" :style="{'--color': color}"></view>
						<text class="flex title lines">{{list.website_list_title}}</text>
						<text class="iconfont icon-xiangyouxiayiye"></text>
					</view>
				</navigator>
				<view class="itemsLists" v-if='list.article' v-for='(art,index_art) in list.article' :key='art.website_article_id'>
					
					<navigator :url="'/otherPage/article/artDetail?artId='+art.website_article_id" hover-class="none">
						<view class='rl flex-box' v-if='art.website_article_atlas.length<1'>
							<view class="leftHeadImg" v-if='art.website_article_img'>
								<image @error='art.website_article_img=""' :src="art.website_article_img?imgUrl+art.website_article_img:staticUrl+'/images/imageLoading.png'" mode="aspectFill"></image>
							</view>
							<view class="rightText" style="flex: 1;">
								<view class="username lines">{{art.website_article_title}}</view>
								<view class="textCont">{{art.website_article_info}}</view>
							</view>
						</view>
						
						<view class="ImgCont" v-else>
							<view class="username1 lines2">
								{{art.website_article_title}}
							</view>
							<view class='imgAll' v-if='art.website_article_atlas.length>1'>
								<image v-for='(pic,index_pic) in art.website_article_atlas' 
								       :key='index_pic' @error='pic=""' 
								       :src="pic?imgUrl+pic:staticUrl+'/images/imageLoading.png'" mode="aspectFill"></image>
							</view>
							<view class='imgOne' v-else>
								<image v-for='(pic1,index_pic1) in art.website_article_atlas' :key='index_pic1' 
								      @error='pic1=""' :src="pic1?imgUrl+pic1:staticUrl+'/images/imageLoading.png'"
									  mode="aspectFill"></image>
							</view>
						</view>
						
						<view class="looks flex-box flex-between">
							<view class="leftDate">
								<text>{{art.articleSource}}</text><text>{{art.website_article_addtime}}</text>
							</view>
							<view class="rightData">
								<view>{{art.website_article_views}} 阅读</view>
							</view>
						</view>
					</navigator>
				</view>
				<view v-else style="text-align: center;color: #666666;margin-top:170upx">小编最近有点懒,什么都没留下ヽ(ー_ー)ノ</view>
			</view>
		</template>
		
		

		<!-- 自定义表单-->
		<template v-if='formIds'>
			<homeForm  :pageData="formIds"></homeForm>
			<!-- <formList :ids='formIds' :info='false'></formList> -->
		</template>
		
		<!-- <showModel @cancelFunc='closeModel' v-if='showModal' type='2'></showModel> -->

		<!-- 分享海报 -->
		<SharePoster v-if='showShareQr' myid=' ' type='1' pageType='0' @closePoster='showShareQr = false'></SharePoster>

		<!-- 活动蒙版层-->
		<view v-if="actMask && actMask.act_id != 0 && showActMask" class="mask flex-box flex-center align-center">
			<view class="boxCenter">
				<image @click="toUrl(actMask.url)" style="width: 500rpx;" :src="imgUrl + actMask.img" mode="widthFix"></image>
				<text class="iconfont icon-guanbi" @click="showActMask=false"></text>
			</view>
		</view>

		<!-- 推荐商品 -->
		<template v-if='pageData.recommendData && pageData.recommendData.state == 1'>
			<view v-if='pageData.recommendData.list'>
				<view class="flex-box flex-center align-center youTitle">
					<text class="toLeft" :style="{'--color': color,'--color_aid': color_aid}"></text>
					<text class="toLeft" :style="{'--color': color,'--color_aid': color_aid}"></text>
					<view>{{ pageData.recommendData.name?pageData.recommendData.name:'推荐商品' }}</view>
					<text class="toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
					<text class="toRight" :style="{'--color': color,'--color_aid': color_aid}"></text>
				</view>
				<view style="padding: 0 24rpx;">
					<view class="my-box">
						<view class="left-box">
							<view class="repeatGoodsList">
								<view v-for="(item, index) in goodsLeftList" :key="index" @click="toGoods(item.goods_id)" class="my-goods-box" :class="'goods-'+item.goods_id">
									<image :src="item.img?imgUrl + item.img:''" mode="widthFix" class="goodImg" :data-name="item.name" :data-id="item.goods_id" :data-type="item.type" @error='onImageLoad' @load="onImageLoad"></image>
									<view class="goods-box-msg">
										<view class="thmeTxt lines2 hisGoodsName2">
											<text v-if='item.type == 1' class="speTag">特价</text>
											<text v-if='item.type == 2' class="speTag">团购</text>
											{{item.name}}
										</view>
										<!-- <view class="saled" v-if='hot == 1'>
											<text>已售{{item.sales_number}}</text>
											<text>热度{{item.show_number}}</text>
										</view> -->
										<view class="profitTitle_ lines" v-if='item.profitTitle'>
											<text>{{ item.profitTitle }}</text>
										</view>
										<view class="prices flex-box flex-between">
											<view class="priceNow">
												<text class="price myPrice">{{item.type == 2?item.open_group_price:item.price}}</text>
												<template v-if='(item.type == 1 || item.type == 0) && parseFloat(item.price) != parseFloat(item.full_price)'>
													<text class="priceReg myPrice">{{item.full_price}}</text>
												</template>
												<template v-if='item.type == 2 && parseFloat(item.full_price) != parseFloat(item.open_group_price)'>
													<text class="priceReg myPrice">{{item.full_price}}</text>
												</template>
											</view>
											<!-- <view class="position flex-box align-center" v-if='position == 1 && positionshow == 1 && item.distance'>
												<text class="iconfont icon-dingwei"></text>
												<text class="txt">{{parseFloat(item.distance)>999?(parseFloat(item.distance)/1000).toFixed(2)+'km':parseFloat(item.distance).toFixed(2)+'m'}}</text>
											</view> -->
										</view>
										<view class="price_description" v-if='item.price_description'>
											<text :class="{color333: bid=='eYiDtKWz6Qhv_bWnBJ7Knw=='}">
												{{ item.price_description }}
												<text class="bg"></text>
											</text>
										</view>
									</view>
									<view class="maskObtained" v-if='item.state == 0'>
										<image :src="staticUrl+'/images/Obtained.png'" class="icon-obtained"></image>
									</view>
								</view>
							</view>
						</view>
						<view class="right-box">
							<view class="repeatGoodsList">
								<view v-for="(item, index) in goodsRightList" :key="index" @click="toGoods(item.goods_id)" class="my-goods-box" :class="'goods-'+item.goods_id">
									<image :src="item.img?imgUrl + item.img:''" mode="widthFix" class="goodImg" :data-name="item.name" :data-id="item.goods_id" :data-type="item.type" @error='onImageLoad' @load="onImageLoad"></image>
									<view class="goods-box-msg">
										<view class="thmeTxt lines2 hisGoodsName2">
											<text v-if='item.type == 1' class="speTag">特价</text>
											<text v-if='item.type == 2' class="speTag">团购</text>
											{{item.name}}
										</view>
										<!-- <view class="saled" v-if='hot == 1'>
											<text>已售{{item.sales_number}}</text>
											<text>热度{{item.show_number}}</text>
										</view> -->
										<view class="profitTitle_ lines" v-if='item.profitTitle'>
											<text>{{ item.profitTitle }}</text>
										</view>
										<view class="prices flex-box flex-between">
											<view>
												<view class="priceNow">
													<text class="price myPrice">{{item.type == 2?item.open_group_price:item.price}}</text>
													<template v-if='(item.type == 1 || item.type == 0) && parseFloat(item.price) != parseFloat(item.full_price)'>
														<text class="priceReg myPrice">{{item.full_price}}</text>
													</template>
													<template v-if='item.type == 2 && parseFloat(item.full_price) != parseFloat(item.open_group_price)'>
														<text class="priceReg myPrice">{{item.full_price}}</text>
													</template>
												</view>
											</view>
											<!-- <view class="position flex-box align-center" v-if='position == 1 && positionshow == 1 && item.distance'>
												<text class="iconfont icon-dingwei"></text>
												<text class="txt">{{parseFloat(item.distance)>999?(parseFloat(item.distance)/1000).toFixed(2)+'km':parseFloat(item.distance).toFixed(2)+'m'}}</text>
											</view> -->
										</view>
										<view class="price_description" v-if='item.price_description'>
											<text :class="{color333: bid=='eYiDtKWz6Qhv_bWnBJ7Knw=='}">
												{{ item.price_description }}
												<text class="bg"></text>
											</text>
										</view>
									</view>
									<view class="maskObtained" v-if='item.state == 0'>
										<image :src="staticUrl+'/images/Obtained.png'" class="icon-obtained"></image>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</template>
		
		
		
		<!-- 版权信息 --> 
		<view v-if='copyright' class="copyright">
			
			<view>{{ copyright }}</view>
		</view>
		
		<showModel @cancelFunc='closeModel' @showModal='showModal = false'  goHome='0' v-if='showModal'  type='100'></showModel>
		
	</view>
</template>
<script>
	import dCoupon from "../../components/Coupons.vue"
	import formList from '../../components/formList.vue'
	import SharePoster from "../../components/sharePoster.vue"
	import GoodsList from '../../components/goodsList.vue'
	import {mapState,mapMutations} from 'vuex';
	import API from '../../api/index.js'
	var that,fastClick=true;
	export default {
		components: {
			SharePoster,
			formList,
			dCoupon,
			GoodsList
		},
		data() {
			return {
				color: getApp().globalData.color,
				color_aid: getApp().globalData.color_aid,
				hideCat: getApp().globalData.hideCat, // 是否关闭猫咪
				navHeight:getApp().globalData.navHeight,
				imgUrl: this.imgUrl,
				sortListData: '', // 分类列表
				vid: uni.getStorageSync("vid"),
				navFixed: false,
				toTop: false,
				openid: uni.getStorageSync("openid"),
				mode: uni.getStorageSync("mode"),
				showShare: true, // 显示分享图标
				getcouponsArry: '',
				isCoupons: false,
				bid: uni.getStorageSync('bid'),
				showModal: false, // 是否显示模态框
				staticUrl: this.staticUrl,
				showShareQr: false, // 展示分享二維碼
				swiperIndex: 0,
				actMask: '', // 跳转主题活动数据
				showActMask: true, //关闭蒙版层
				pageData: '',
				
				lesson_config: uni.getStorageSync('startUp').lesson_config,// 首页是否显示课程入口
				showLessonDoor: true,// 显示课程入口动画切换
				closeLessonDoor: false,// 是否关闭了课程入口
				scrollTop: 0,
				formIds:'',
				service_state: uni.getStorageSync('startUp').service_state,// 是否开起客服系统
				tabs:[],
				current: 0,
				SwipeHeight:300,
				storeName: uni.getStorageSync('startUp').nameDefinition.storeDefinitionName,
				goodsName: uni.getStorageSync('startUp').nameDefinition.goodsName,
				currBg: getApp().globalData.color,
				copyright: uni.getStorageSync('startUp').copyright,
				
				goodsList: [],
				goodsListCount:0, //加载第i张图片
				goodsLeftList:[], // 左侧商品列表
				goodsLeftListHeight: 0,
				goodsRightList: [], // 右侧商品列表
				goodsRightListHeight: 0,
				hideBg: 0,
				chameleon: 1,
				
				
				getuserinfo:true,
				infoType:1
			}
		},
		created() {
			let that = this;
			that.showModal = false;
			if (!that.vid || !that.openid) {
				that.getOpenid();
			}

		},
		onShow() {
			that = this;
			that.showModal = false;
			if (!that.vid || !that.openid) {
				that.getOpenid();
			}
			
			//  判断用户注册成功，未拿到头像和名称信息
			let info = uni.getStorageSync('userinfo');
			let openid = uni.getStorageSync('openid');
			let vid = uni.getStorageSync('vid');
			 if(openid && vid && vid > 1){
				if(info.nickname == null || info.nickname == '微信用户' || info.nickname == undefined){
					that.showModal = true;
				}else{
					that.showModal = false;
				}	
			 }
		},
		mounted(e) {
			that = this;
			
			that.storeName = that.storeName?that.storeName:"店铺"
			// #ifdef H5
			this.H5Share()
			// #endif
		},
		
	
		methods: {
			...mapMutations(['setTab','setvideoNavid']),
			changeTab(index) {
				that.getSwiperHeight()
			},
			change(e){
				that.current = e.detail.current;
				that.getSwiperHeight()
			},
			getSwiperHeight(){
				if(that.tabs && that.tabs.length > 0){
					setTimeout(()=>{
						uni.createSelectorQuery().in(this).select(".getHeight"+that.current).boundingClientRect((res) => {
						   that.SwipeHeight = res.height<200?200:res.height
						}).exec();
					},100)
				}
			},
			makephone(phone){
				uni.makePhoneCall({
					phoneNumber: phone
				})
			},
			call_(){
				if(that.service_state == 1){
					var vid = uni.getStorageSync("vid")
					if (vid) {
						uni.navigateTo({
							url: "/userPage/message/consult"
						})
					} else {
						that.showModal = true
					}
				}else{
					that.call()
				}
			},
			toLesson(){
				// #ifdef H5
				uni.setStorageSync('goOut','1');// 避免清空缓存信息 否则将拿不到数据
				window.location.href='https://sra.weikebaba.com/index.php/singleSaleLesson/index?pageType=99&veriCode='+that.bid+'/reset/1'
				// #endif
			},
			closeModel() {
				that.showModal = false;
				that.getHomeData();
				if (that.vid) {
					that.getCoupons();
				}
			},
			scroll: function(e) {
				that.old.scrollTop = e.detail.scrollTop
			},
			swiperChange(event) {
				that.swiperIndex = event.detail.current;
				if(that.pageData.bannerData.list[that.swiperIndex].dominant_color){
					let rgba = that.pageData.bannerData.list[that.swiperIndex].dominant_color
					that.currBg = 'rgba('+rgba.r+','+rgba.g+','+rgba.b+',1)'
				}
			},
			getOpenid() {
				// #ifdef H5
				API.user.getVid().then(vid => {
					that.vid = vid
				})
				return
				// #endif
				var openid = uni.getStorageSync("openid");
				if (openid) {
					API.user.getVid().then(vid => {
						that.vid = vid
					})
				} else {
					// #ifdef MP
					var set = null;
					clearTimeout(set)
					// #endif
					API.user.getOpenid().then(openid => {
						if(openid){
							that.openid = openid
							API.user.getVid().then(vid => {
								that.vid = vid
							})
						}else{
							// #ifdef MP
							set = setTimeout(function() {
								that.getOpenid();
							}, 2000)
							// #endif
						}
					})
				}
			},
			getCoupons: function(id) { // 获取当前用户可以领的优惠券
				var vid = uni.getStorageSync("vid");
				that.$http.post({
					url: '/SRA_simMallApi/SortCoupons',
					data: {
						vId: vid,
						actId: id ? id : '',
						bid: that.bid,
					}
				}).then(res => {
					if (res.code == 100 && res.data) {
						that.isCoupons = true;
						that.getcouponsArry = res.data
					}
				})
			},
			_GETCOUPONS: function(cou_id) { // 直接领取某优惠券
				let vid = uni.getStorageSync('vid')
				if (!vid) {
					that.showModal = true;
				} else {
					if(!fastClick)
						return
					fastClick = false
					that.$http.post({
						url: '/SRA_simMallApi/SortOneCoupons',
						data: {
							bid: uni.getStorageSync('bid'),
							vId: vid,
							actId: uni.getStorageSync('act_id'),
							couponsId: cou_id,
						}
					}).then(res => {
						if (res.code == 100 && res.data) {
							that.getHomeData();
						} else {
							uni.showToast({
								icon: "none",
								title: '领取失败，请稍后再试',
								duration: 2000
							})
						}
						fastClick = true
					})
				}
			},
			toAct(act_id, goodsData,actType) {
				if(actType == 3){ // 主题秒杀
					uni.navigateTo({
						url: '/activityPage/seckill/index?act_id=' + act_id
					})
				
				}else if(actType == 4){ // 分组秒杀
					uni.navigateTo({
						url: '/activityPage/seckill/goods_list?act_id=' + act_id
					})
				
				}else{
					if (goodsData.length > 1) { // 多商品活动
						uni.navigateTo({
							url: '/activityPage/bargain_goods/more_goods_page?act_id=' + act_id
						})
					} else { // 单商品活动
						if (goodsData[0].type == 2) {
							uni.navigateTo({
								url: '/activityPage/group/singleitemliner?act_id=' + act_id
							})
						} else {
							uni.navigateTo({
								url: '/activityPage/bargain_goods/a_single_commodity?act_id=' + act_id
							})
						}
					}
				}
				
				
			},
			
			istoGoods(type,goods_id,lesson_id){
				if(type == 13 || type == 14){
					this.toUrl(`/pages/ply/courseDetail?lid=${lesson_id}&state=1`)
					
				}else{
					uni.navigateTo({
						url: '/pages/goods/goodsDetail?goodsid=' + goods_id
					})
				}
			},
			toSign() {
				// 去签到
				let vid = uni.getStorageSync('vid')
				if (vid && vid != 0) {
					that.$http.post({
						url: '/SRA_userIntegral/myInfo',
						data: {
							VeriCode: that.bid,
							vId: vid
						}
					}).then(res => {
						if (res.data && res.data.signInState) {
							if(res.data.signInState == 1){
								uni.navigateTo({
									url: '/userPage/sign2/sign_in'
								})
							}else{
								uni.navigateTo({
									url: '/userPage/sign/sign_in'
								})
							}
						}
					})
				} else {
					that.showModal = true;
				}
			},
			onImageLoad: function(e){
				let rImgH = 0;
				var goodsId = 'goods-' + e.target.dataset.id;
				uni.createSelectorQuery().in(this).select("."+goodsId).boundingClientRect(function(data) {
					rImgH += data.height
					if(that.goodsListCount==0){
						that.goodsLeftListHeight += rImgH;//第一张图片高度加到goodsLeftListHeight 
						that.goodsListCount++;
						that.goodsRightList.push(that.goodsList[that.goodsListCount]);//添加第二张图片到goodsRightList数组，因为第一张已经初始化到左侧列表中
					}else{
						that.goodsListCount++;
						if(that.goodsLeftListHeight > that.goodsRightListHeight){//把图片的高度加到目前高度更低的栏中
							that.goodsRightListHeight += rImgH;
						}else{
							that.goodsLeftListHeight += rImgH;
						}
						if(that.goodsListCount<that.goodsList.length){//根据目前的栏高，把下一张图片，push到低的那栏
							if(that.goodsLeftListHeight > that.goodsRightListHeight){
								that.goodsRightList.push(that.goodsList[that.goodsListCount]);
							}else{
								that.goodsLeftList.push(that.goodsList[that.goodsListCount]);
							}
						}
					}
				}).exec()
			},
			getHomeData() {
				var set1 = null;
				let url = '/zzj_singleSaleApi/getActs';
				let vid = uni.getStorageSync('vid')
				if(getApp().globalData.isDemo == 1){ // 演示版本
					url = '/singleSaleDemo/getActs'
				}
				clearTimeout(set1);
				this.$http.post({
					url: url,
					data: {
						bid: uni.getStorageSync('bid'),
						v_id: vid
					}
				}).then(res => {
					var data = res.data
					if (res.errcode == 100) {
						if (data.act_id != 0) { // 主题活动配置
							var goodsCount = res.actData.goodsCount,
								goodsType = res.actData.goodsType,
								url;
							if (goodsCount == '1' && (goodsType == '1' || goodsType == '0')) { // 单商品特价/普通商品
								url = '/activityPage/bargain_goods/a_single_commodity?act_id='+data.act_id
							}
							if (goodsCount == '1' && goodsType == '2') { // 单商品团购
								url = '/activityPage/group/singleitemliner?act_id='+data.act_id
							}
							if (goodsCount != '1') { // 多商品首页
								url = '/activityPage/bargain_goods/more_goods_page?act_id=' + data.act_id
							}
							if(res.actData.actType == 3){ // 主题秒杀
								url = '/activityPage/seckill/index?act_id=' + data.act_id
							}
							if(res.actData.actType == 4){ // 分组秒杀
								url: '/activityPage/seckill/kill_list?act_id=' + data.act_id
							}
							that.actMask = {
								act_id: data.act_id,
								url: url,
								img: res.actData.img
							}
						}
						if (data.menuData && data.menuData.state == 1 && data.menuData.list){
							that.sortListData = data.menuData.list;
							this.$emit('sortListData',true)
						}
						let state = 0
						if (data.bannerData && data.bannerData.state == 1 && data.bannerData.list){
							if(data.bannerData.list[0].dominant_color){
								let rgba =data.bannerData.list[0].dominant_color
								that.currBg = 'rgba('+rgba.r+','+rgba.g+','+rgba.b+',1)'
							}
							state = data.bannerData.chameleon?data.bannerData.chameleon:0
							that.chameleon = data.bannerData.chameleon
						}
						that.hideBg = state
						if (data.menuData && data.menuData.state == 1 && data.menuData.list){
							that.sortListData = data.menuData.list;
							this.$emit('sortListData',true)
						}
						
						if (data.orderData && data.orderData.state == 1 && data.orderData.list){
							that.formIds = data.orderData.list
						}
						
						// 分类2
						if (data.classify2Data && data.classify2Data.state == 1 && data.classify2Data.list){
							that.tabs = data.classify2Data.list
							
							
						}
						
						if (data.recommendData && data.recommendData.state == 1 && data.recommendData.list) {
							if(that.goodsList.length < 1){
								that.goodsList = data.recommendData.list;
								that.goodsLeftList.push(data.recommendData.list[0])
							}
						}else{
							that.goodsList = []
						}
						
						that.pageData = res.data
					} else {
						set1 = setTimeout(function() {
							that.getHomeData();
						}, 2000)
						uni.showToast({
							icon: "none",
							title: res.msg,
							duration: 2000
						})
					}
				})
			},
			banerGo(item, name, isBanner) {
				/**
				 *  banner 点击跳转  
				 *  type：0不跳转  1跳活动  2跳商品  3跳商品分类  4跳文章栏目  5跳文章详情  6跳表单  7游戏  8跳路由
				 *  goodsType：1 特价  2 团购
				 *  goodsCount：1 单商品 大与1：多商品
				 * **/
				let id;
				if(isBanner == 1){
					id = item.id
				} 
				if(isBanner == 0){
					id = item.classify_id
				} 
				if (item.type == 0) // 不跳转
					return
				if (item.type == 1) { // 1跳活动
					if (item.goodsCount == '1' && item.goodsType == '1') { // 单商品特价/普通商品
						uni.navigateTo({
							url: '/activityPage/bargain_goods/a_single_commodity?act_id=' + id
						})
					}
					if (item.goodsCount == '1' && item.goodsType == '2') { // 单商品团购
						uni.navigateTo({
							url: '/activityPage/group/singleitemliner?act_id=' + id
						})
					}
					if(item.actType == 3){ // 主题秒杀
						uni.navigateTo({
							url: '/activityPage/seckill/index?act_id=' + id
						})
						return
					}
					if(item.actType == 4){ // 分组秒杀
						uni.navigateTo({
							url: '/activityPage/seckill/goods_list?act_id=' + id
						})
						return
					}
					if (item.goodsCount != '1') { // 多商品首页
						uni.navigateTo({
							url: '/activityPage/bargain_goods/more_goods_page?act_id=' + id
						})
					}
				}
				if (item.type == 2) { //2跳商品
					that.toGoods(id,item.goodsType)
				}
				if (item.type == 3) { // 跳栏目
					var clsNAme = name ? name : that.goodsName+'分类'
					uni.navigateTo({
						url: "/pages/goods/goods_list?classId=" + id + "&className=" + clsNAme
					})
				}
				if (item.type == 4) { // 跳文章栏目
					uni.navigateTo({
						url: '/pages/article/artList?listId=' + id
					})
				}
				if (item.type == 5) { // 跳文章详情
					uni.navigateTo({
						url: '/otherPage/article/artDetail?artId=' + id
					})
				}
				if (item.type == 6) { // 跳表单
					uni.navigateTo({
						url: '/pages/reserve/formSubmit?ordId=' + id
					})
				}
				if (item.type == 7) { // 跳游戏
					if (!item.gameactTpl) {
						uni.showToast({
							title: '暂未配置类型哦',
							icon: 'none'
						})
					}
					let vid = uni.getStorageSync('vid')
					if (!vid) {
						that.showModal = true;
					} else {
						if (item.gameactTpl == 'default') {
							//摇一摇
							uni.navigateTo({
								url: "/otherPage/lottery/shark?cid=" + id
							})
						} else if (item.gameactTpl == 'marquee') {
							//跑马灯
							uni.navigateTo({
								url: "/otherPage/lottery/good_luck?cid=" + id
							})
						} else if (item.gameactTpl == 'slotMachine') {
							//老虎机
							uni.navigateTo({
								url: "/otherPage/lottery/tiger?cid=" + id
							})
						} else if (item.gameactTpl == 'bigWheel') {
							//大转盘
							uni.navigateTo({
								url: "/otherPage/lottery/roulette?cid=" + id
							})
						}
					}
				}
				if (item.type == 8) { // 跳本地路由
					uni.navigateTo({
						url: item.website_list_url
					})
				}
				if (item.type == 14) { // 视频分类
				    if(item.lowerList == 0) return this.toUrl(`/pages/ply/plyList?id=${item.classify_id || item.id}`)
				   this.setTab(3);
				   this.setvideoNavid(item.classify_id);
				   this.$pop.relaunchTab();
					
				}
				if (item.type == 9) { // 跳三方url
					// #ifdef H5
					uni.setStorageSync('goOut','1')
					window.location.href = item.website_list_url
					// #endif
					// #ifndef H5
					uni.navigateTo({
						url: '/userPage/onlineService/webHttp?isURL='+item.website_list_url
					})
					// #endif
				}
			},
			toOrderList(url) {
				let vid = uni.getStorageSync('vid')
				if (url == 'share') {
					// #ifdef MP-TOUTIAO
					return
					// #endif
					var mode = uni.getStorageSync('mode');
					if (mode != 0) { // 分销模式
						if (!vid || vid == 0) {
							that.showModal = true;
							return
						}
					}
					that.showShareQr = true;
					return
				}
				if (!vid) {
					that.showModal = true;
				} else {
					uni.navigateTo({
						url: url
					})
				}
			},
			toArticle(id){
				if(that.pageData.noticeData.click == 1 && id){
					uni.navigateTo({
						url: '/otherPage/article/artDetail?artId=' + id
					})
				}
			}
		},
		onShareAppMessage() {
			let shareData = uni.getStorageSync('shareData');
			let vid = uni.getStorageSync('vid')
			return {
				title: shareData.title,
				desc: shareData.desc,
				path: '/pages/index/index?share_v_id=' + vid,
				imageUrl: shareData.imageUrl
			}
		},
		onShareTimeline() {
			let shareData = uni.getStorageSync('shareData');
			let vid = uni.getStorageSync('vid');
			return {
				title: shareData.desc,
				query: {
					share_v_id: vid
				},
				imageUrl: shareData.imageUrl
			}
		},
		onPageScroll(e) {
			if (e.scrollTop > 100) {
				that.toTop = true;
				if (that.hideCat != true) {
					that.showShare = false;
				}
			} else {
				that.toTop = false
				that.showShare = true;
			}
			if(that.lesson_config == '1'){ // 显示了课程入口
				if(that.scrollTop > e.scrollTop || e.scrollTop == 0){ // 上滑动
					that.showLessonDoor = true
				}else{
					that.showLessonDoor = false
				}
				that.scrollTop = e.scrollTop;
			}
			
			if (that.sortListData) {
				uni.createSelectorQuery().select(".bottomBox").boundingClientRect(function(res) {
					if (res.top && res.top <= 0) {
						that.navFixed = true;
					} else {
						that.navFixed = false
					}
				}).exec();
			}
		},
	}
</script>

<style scoped lang="scss">
	.navButton{
		position: absolute;
		background-color:transparent;
		
		
		
		width:100%;
		height: 100%;
		top:0;
		left:0;
		z-index:888;
	}
	button
	.imgPost{
		position: absolute;
		right: 0;
		top:0;
	}
.home_content{
	&::-webkit-scrollbar {
		display: none;
	}
	// 课程入口
	.lesson-door{
		position: fixed;
		right: 20rpx;
		z-index: auto;
		bottom: 25%;
		z-index: 889;
		transform: scale(0);
		transition: all .5s;
		&.active-door{
			transform: scale(1);
		}
		.close-door{
			position: absolute;
			left: 0;top: 0;
			width: 30rpx;height: 30rpx;
			z-index: 999;
		}
		image{
			display: block;
			width: 130rpx;
			height: 130rpx;
		}
	}
	
	// 搜索
	.homeSearch {
		width: 100%;
		padding: 20upx;
		z-index: 3;
		display: flex;
		position: relative;
		.icon_msg {
			height: 40upx;
			width: 40upx;
			margin: 0 30upx 0 12upx;
		}
		.inputSearch {
			height: 60upx;
			background: rgba(255, 255, 255, .3);
			border-radius: 40upx;
			width: 100%;
			padding: 0 20upx;
			box-sizing: border-box;
			font-size: 28upx;
			flex: 1;
			color: white;
			.iconfont{
				font-size: 34rpx;
			}
			text{
				opacity: 0.8;
				margin-right: 6rpx;
			}
		}
		.icon_sort {
			height: 40upx;
			width: 40upx;
			margin: 0 12upx 0 30upx;
		}
	}
	
	// 优惠券
	.coupon {
		background: white;
		padding: 24upx;
		.couponTitle {
			.title {
				vertical-align: middle;
				font-weight: bold;
				font-size: 32upx;
				color: #222;
			}
			.yhqIcon {
				width: 80upx;
				height: 80upx;
				margin-left: -22upx;
				margin-top: -5upx;
			}
		}
		.coupon-list {
			white-space: nowrap;
			overflow: auto;
			&::-webkit-scrollbar {
				display: none;
			}
			.coupon-item {
				height: 168upx;
				width: 254upx;
				display: inline-block;
				overflow: hidden;
				border-radius: 16upx;
				position: relative;
				margin-right: 20upx;
				vertical-align: middle;
				.couponTag {
					position: absolute;
					color: white;
					top: 0;
					left: 0;
					border-radius: 16upx 0 16upx 0;
					padding: 4upx 10upx;
					font-size: 20upx;
				}
				.couponLeft {
					width: 174upx;
					text-align: center;
					padding: 0 6upx;
					.couponShop {
						color: #8B8A8A;
						font-size: 20upx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 1;
						-webkit-box-orient: vertical;
						position: relative;
					}
					.couponRequire {
						font-size: 22upx;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 1;
						-webkit-box-orient: vertical;
						position: relative;
					}
					.couponMoney {
						color: #222222;
						font-weight: bold;
						margin-top: 46upx;
						font-size: 40upx;
					}
				}
				.couponright {
					position: absolute;
					top: 50%;
					right: 0;
					width: 80upx;
					font-size: 30upx;
					font-weight: bold;
					z-index: 6;
					text-align: center;
					&.touming {
						background: #121212;
					}
					text {
						display: inline-block;
						width: 32upx;
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%, -50%);
						font-size: 30upx;
						white-space: normal;
						font-weight: bold;
					}
				}
				.clipLine {
					position: absolute;
					height: 130upx;
					top: 20upx;
					right: 72upx;
					opacity: .4;
					width: 4upx;
					border-left: 4upx dashed;
					box-sizing: border-box;
				}
				.couponBg {
					position: absolute;
					width: 100%;
					height: 100%;
					left: 0;
					top: 0;
					opacity: .25;
					z-index: 0;
				}
				image {
					position: absolute;
					width: 100%;
					height: 100%;
					top: 0;
					left: 0;
				}
			}
		}
	}
	
	// 分类
	.classNav {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: -1;
		height: 80upx;
		border-bottom: 2upx solid #dedede;
		transition: opacity .2s;
		opacity: 0;
		white-space: nowrap;
		background: #FFFFFF;
		&::-webkit-scrollbar {
			width: 0;
			height: 0;
			background-color: transparent;
			display: none;
		}
		.classNavItem {
			display: inline-block;
			padding: 24upx 0;
			background: #FFFFFF;
			text-align: center;
			position: relative;
			height: 80upx;
			width: 160upx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			&::before {
				position: absolute;
				content: '';
				width: 1upx;
				height: 50%;
				background: #dedede;
				left: 0%;
				top: 25%;
			}
			
			&:nth-child(1):before {
				display: none;
			}
		}
		&.navSoptyit {
			opacity: 1;
			z-index: 23;
		}
	}

	// 活动展示
	.superBrand {
		padding-bottom: 24rpx;
		background: white;
		.gtthree{
			margin: 0 24rpx;
		}
		.superTitle {
			padding: 24upx;
			background: white;
			.superIcon {
				width: 50upx;
				vertical-align: sub;
				margin-right: 10upx;
			}
			.brandTitle {
				color: #242424;
				font-size: 32upx;
				font-weight: bold;
			}
			.brandRight {
				background: #FAFAFA;
				border: 1px solid #F2F2F2;
				border-radius: 6upx;
				padding: 6upx 10upx;
				.icon-xiangyouxiayiye{
					font-size: 24rpx;
					color: #BCBCBC;
				}
				.brandInfo {
					letter-spacing: 4rpx;
					vertical-align: middle;
					margin-right: 10rpx;
				}
			}
		}
		.brandList {
			background: white;
			padding: 0 24upx;
			box-sizing: border-box;
			white-space: nowrap;
			margin-right: -10rpx;
			overflow-x: auto;
			>view{
				vertical-align: middle;
				display: inline-block;
				width: calc(33.33% - 10rpx);
				margin-right: 10upx;
				overflow: hidden;
				border: 1px solid #F1F1F1;
				border-radius: 10rpx;
				padding-bottom: 10rpx;
				>view{
					padding: 10rpx 10rpx 0;
				}
				.brandImg {
					width: calc(100%);
					height: calc(33.33vw - 14rpx);
				}
				.myPrice{
					color: $uni-color-price;
				}
				.or{
					text-decoration: line-through;
					color: #999999;
					margin-left: 4rpx;
				}
			}
		}
	}
 
	// 多图轮播
	.uni-padding-wrap {
		position: relative;
		.oval-cover {
			height: 170upx;
			width: 100%;
			bottom: -1px;
			background: white;
			position: absolute;
			.oval {
				height: 88upx;
				border-radius: 50%;
				top: -44upx;
				position: relative;
			}
		}
		.page-section {
			height: 375rpx;
			.swiper{
				height: 376rpx;
				.swiperImg {
					height: 100%;
					display: block;
				}
			}
			/* 自定义轮播图指示点 */
			.swiper-duration {
				position: absolute;
				width: 100%;
				bottom: 24upx;
				justify-content: center;
				display: flex;
				z-index: 4;
				.swiper-index {
					width: 16upx;
					height: 16upx;
					border-radius: 8upx;
					background: rgba(96, 96, 96, .7);
					margin: 0 10upx;
					transition: all .15s;
				}
				
				.swiper-active {
					width: 16upx;
					height: 16upx;
					border-radius: 8upx;
					margin: 0 10upx;
					transition: all .15s;
				}
			}
		}
		&.new_style{
			.liner_bg{
				width: 100%;
				bottom: 24rpx;
				z-index: 2;
				position: absolute;
				box-sizing: content-box;
				/* #ifdef H5 */
				padding-top: 100rpx;
				/* #endif */
				background: linear-gradient(to bottom, var(--color),#FFFFFF);
			}
			.page-section{
				padding: 0 24rpx;
				.swiper{
					height: 364rpx;
					position: relative;
					z-index: 3;
				}
				border-radius: 12rpx;
				swiper{
					border-radius: 16rpx;
					overflow: hidden;
				}
			}
		}
	}
	
	// 广告图
	.advBox {
		padding: 0 24upx;
		background: white;
		border: 1px solid transparent;
	}
	
	// 分类/魔方导航/金刚区
	.classify {
		background: white;
		overflow-x: auto;
		padding: 24upx 0;
		.sortList {
			white-space: nowrap;
			display: flex;
			justify-content: space-around;
			.sort-item {
				display: inline-block;
				// width: 20%;
				text-align: center;
				font-size: 24upx;
				overflow: hidden;
				margin: 6rpx 0;
				position: relative;
				text {
					color: #666;
					white-space: nowrap;
					font-size: 22rpx;
				}
				image {
					width: 96upx;
					height: 96upx;
					display: block;
					margin: 0 auto;
					margin-bottom: 10upx;
				}
			}
		}
	}
	
	// 通告
	.notice{
		background-color: #FFFFFF;
		padding: 0 $uni-page-space;
		height: 60rpx;
		>view{
			margin-right: 20rpx;
			.name{
				font-size: 28rpx;
				font-weight: bold;
				color: inherit;
			}
			.icon-tongzhi{
				font-size: 36rpx;
				margin-right: 6rpx;
				position: relative;
				top: 2rpx;
				color: inherit;
			}
		}
		swiper{
			height: 100%;
		}
	}
	
	// 分类商品
	.recomdList {
		background: white;
		padding: 25upx;
		.recomdItem{
			border-radius: 16rpx;
			overflow: hidden;
			.threeList {
				position: relative;
				padding-left: 24upx;
				height: 390upx;
				overflow: hidden;
				z-index: 2;
				.recimdInfo {
					position: relative;
					z-index: 22;
					color: white;
					top: 70upx;
				}
				.recimdTitle {
					position: absolute;
					z-index: 2;
					color: white;
					font-size: 32upx;
					top: 24upx;
				}
				.recomdImg {
					width: 100%;
					position: absolute;
					top: 0;
					left: 0;
				}
				.masks {
					position: absolute;
					width: 100%;
					height: 100%;
					bottom: 0;
					left: 0;
					z-index: 1;
					// border-radius: 16rpx;
					background: linear-gradient(to top, rgba(250, 250, 250, 1), rgba(250, 250, 250, 1), rgba(250, 250, 250, .4), rgba(250, 250, 250, 0), rgba(250, 250, 250, 0))
				}
				.three {
					margin-top: 90upx;
					position: relative;
					z-index: 3;
					.threeItem {
						width: calc(50% - 24upx);
						overflow: hidden;
						position: relative;
						z-index: 2;
						display: inline-block;
						margin-right: 24upx;
						.threeImg {
							background: white;
							width: 100%;
							height: 215upx;
							border-radius: 6upx;
							overflow: hidden;
							padding: 24upx;
							position: relative;
							image {
								display: block;
								max-width: 100%;
								position: absolute;
								height: 100%;
								top: 50%;
								left: 50%;
								transform: translate(-50%, -50%);
							}
						}
						.threePrice {
							text-align: center;
							margin-top: 8upx;
							text{
								color: $uni-color-price;
								font-size: 26rpx;
							}
						}
					}
				}
			}
		}
	}

	// 只有一个商品时 大于三的
	.gtthree{
		.gtItem {
			position: relative;
			margin-top: 20upx;
			border-radius: 16upx;
			overflow: hidden;
			border: 1px solid #F1F1F1;
			.goods_Msg{
				padding: 20rpx;
			}
			.gtNum-box{
				margin-top: 10rpx;
				.gtInfo {
					color: #808080;
					font-size: 28upx;
					text-align: justify;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					-webkit-box-orient: vertical;
				}
				.gtNum {
					position: absolute;
					top: 24rpx;
					right: 24rpx;
					background: #EDEDED;
					padding: 6rpx 16rpx;
					border-radius: 20rpx;
					color: #6E0E00;
				}
				.gtNum1 {
					position: absolute;
					top: 24rpx;
					right: 24rpx;
					padding: 6upx 16upx;
					border-radius: 20upx;
					color: white;
				}
			}
			.gtImage {
				height: 360rpx;
				overflow: hidden;
				position: relative;
				image {
					width: 100%;
					position: absolute;
					left: 0;
					top: 50%;
					transform: translateY(-50%);
				}
			}
			.gtName {
				display: inline-block;
				flex: 1;
				overflow: hidden;
				font-size: 32upx;
				font-weight: bold;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				-webkit-box-orient: vertical;
				.myTag {
					background: #C62F2F;
					color: white;
					padding: 3rpx 10rpx;
					border-radius: 4rpx;
					margin-right: 8rpx;
					vertical-align: 4rpx;
				}
			}
			.gtPrice {
				display: flex;
				.myPrice{
					color: $uni-color-price;
					font-size: 28rpx;
					font-weight: bold;
					&::before{
						font-weight: bold;
					}
				}
				.price_regi {
					color: #999999;
					font-size: 26rpx;
					text-decoration: line-through;
				}
			}
		}
	}
	
	// 官网内容
	.indexContens {
		padding: $uni-page-space;
		background: #FFFFFF;
		margin: 24upx;
		border-radius: 16upx;
		.allTitles {
			.leftS {
				width: 8upx;
				height: 42upx;
				margin:8upx 20upx 0 0;
			}
			.title{
				color: #333333;
				font-weight: bold;
				font-size: 32rpx;
			}
			.icon-xiangyouxiayiye{
				font-size: 32rpx;
				font-weight: normal;
			}
		}
		.itemsLists {
			width: 100%;
			padding: 20upx 0;
			border-bottom: 1upx solid #F2F2F2;
			overflow: hidden;
			.leftHeadImg {
				width: 250upx;
				margin-right: 20upx;
				display: inline-block;
				height: 190upx;
				float: left;
				image {
					width: 250upx;
					height: 190upx;
					border-radius: 10upx;
				}
			}
			.rightText {
				width: 420upx;
				display: inline-block;
				// height: 190upx;
				.username{
					font-weight: 700;
					font-size: 32rpx;
				}
			}
			
			
			.textCont {
				margin: 20rpx 0;
				color: #333333;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 3;
				-webkit-box-orient: vertical;
				line-height: 36rpx;
				text-align: justify;
			}
		
			.ImgCont {
				.username1 {
					font-weight: bold;
					font-size: 32rpx;
					text-align: justify;
					line-height: 44upx;
					max-height: 88upx;
					margin-bottom: 16upx;
				}
				.imgOne image {
					height: 360upx;
					border-radius: 10upx;
				}
				.imgAll {
					margin-right: -14upx;
					overflow-y: hidden;
					overflow-x: auto;
					white-space: nowrap;
					height: 192upx;
					
				}
				.imgAll image {
					width: calc(33.33% - 14upx);
					margin-right: 14upx;
					display: inline-block;
					height: 192upx;
					border-radius: 10upx;
				}
				image:last-child {
					margin-right: 0;
				}
			}
			.looks {
				overflow: hidden;
				margin-top: 16upx;
				.leftDate {
					color: #666666;
					text {
						margin-right: 10upx;
					}
				}
				.rightData view {
					color: #666666;
					margin-right: 20upx;
				}
			}
			
		}
		// .rl {
		// 	height: 190upx;
		// }
	}
	.paeninlist{
		width: calc(50% - 12rpx);
		height: 460rpx;
		border:1px solid #efefef;
	}
	.inImgs{
		width:100%;
		height: 336rpx;
		display: block;
	}
	.lesson_isnfo{
		height: 40rpx;
		padding:0 10rpx;
	}
	.threePrices {			margin-top: 8upx;			text{				color: $uni-color-price;				font-size: 26rpx;			}		}
	// 分类商品 (2)
	.v-tabs-box{
		padding-top: 20rpx;
		.v-tabs{
			// height: 100rpx;
		}
		swiper{
			.goods-box{
				flex-wrap: wrap;
				padding: 0 0 24rpx 24rpx;
				.goods{
					width: calc(50% - 24rpx);
					margin-right: 24rpx;
					background-color: none;
					border-radius: 12rpx;
					overflow: hidden;
					margin-top: 24rpx;
					position: relative;
					.goods-tags{
						position: absolute;
						width: 36rpx;
						top: 0;
						right: 20rpx;
						z-index: 2;
						text-align: center;
						padding: 4rpx 0;
						line-height: 24rpx;
						background-color: #FF0B03;
						text{
							color: white;
							position: relative;
							z-index: 3;
							font-size: 22rpx;
						}
						&::before{
							position: absolute;
							content: '';
							left: 0;
							border: 20rpx solid rgba(0,0,0,0);
							border-left-color: #FF0B03;
							bottom: -18rpx;
						}
						&::after{
							position: absolute;
							content: '';
							border: 20rpx solid rgba(0,0,0,0);
							border-right-color: #FF0B03;
							bottom: -18rpx;
							right: 0;
						}
					}
					image{
						height: 336rpx;
						display: block;
					}
					.speTag{
						margin-right: 6rpx;
					}
					.msgHeight1{
						height: 146rpx;
					}
					.msgHeight2{
						height: 202rpx;
					}
					
					.msg{
						padding: 14rpx;
						flex-direction: column;
						background-color: #FFFFFF;
						
						.name{
							font-size: 28rpx;
							color: #333333;
							line-height: 36rpx;
							text-align: justify;
						}
						
						.info{
							color: #999999;
							margin-top: 10rpx;
						}
						.price{
							text{
								&:nth-child(1){
									color: #FF0B03;
									font-size: 34rpx;
									font-weight: bold;
								}
								&:nth-child(2){
									text-decoration: line-through;
									color: #999999;
									font-size: 20rpx;
								}
							}
							.btn{
								background-color: $tag-bg;
								font-size: 22rpx;
								height: 34rpx;
								line-height: 34rpx;
								padding: 0 8rpx;
								border-radius: 6rpx;
							}
						}
					}
				}
			}
		}
	}
	
	// 推荐门店
	.storeListBox{
		width: 100%;
		background-color: #FFFFFF;
		padding: 30rpx;
		margin-top: 30rpx;
		.tjtxt{font-size: 28rpx;font-weight: bold;color: #222222;}
		.icon-xiangyouxiayiye {
			font-size: 34rpx;
			color: #999999;
		}
		.icon-dianpu{
			font-size: 34rpx;
			color: #232323;
			margin-right: 6rpx;
		}
		.storeItem{padding: 30rpx 0;border-bottom: 1px solid #EEEEEE;}.storeTitle{font-size: 26rpx;color: #222222;margin-bottom: 16rpx;}.storeType{color: #999;margin-top: 4rpx;}
		.storeItem:nth-last-of-type(1){border-bottom: none;padding-bottom: 0;}
		.storeType{
			color: #999;
			margin-top: 6rpx;
			text{color: #999;}
			.icon-dianhua{
				font-size: 34rpx;
				margin-right: 10rpx;
			}
			.tel{
				font-size: 28rpx;
			}
		}
		.storeLogo{border-radius: 50%;width: 140rpx;height: 140rpx;margin-right: 30rpx;}
	}
}
</style>
